package com.liyunc.demo.service;

import com.liyunc.demo.model.entity.User;
import com.liyunc.demo.model.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserRepository userRepository;

    public void saveUser(User user) {
        userRepository.save(user);
    }


    public void deleteUserById(Long id) {
        userRepository.deleteById(id);
    }
}
